﻿$$ list.tpl
$$
$$ JDBC函数库模板
$$

statement: 查找驱动类{driver-class} ->
(jstatic "forName" "java.lang.Class" {driver-class})

statement: 获得数据库连接：url={url} ->
(jstatic "getConnection" "java.sql.DriverManager" {url})

statement: 设置连接{conn}为自动提交 ->
(jcall "setAutoCommit" conn (jfield-raw (jclass "java.lang.Boolean") "TRUE"))

statement: 取消连接{conn}的自动提交 ->
(jcall "setAutoCommit" conn (jfield-raw (jclass "java.lang.Boolean") "FALSE"))

statement: 关闭{open-thing} ->
(jcall "close" {open-thing})

statement: 为连接{conn}创建语句 ->
(jcall "createStatement" {conn})

statement: 执行{stmt}的查询语句：{sql} ->
(jcall "executeQuery" stmt sql)

statement: 结果集{rs}有下一条？ ->
(jcall "next" {rs})

statement: 取得结果集{rs}的第{n}列的字符串
(jcall "getString" {rs} {n})



